Replication code for Kargar and Mann (RFS 2022)

INSTRUCTIONS:

1. Unzip the archive public_replication_archive.zip (in which this README was bundled) into a local directory with sufficient storage. If you intend to build all datasets from the raw files (see step 3 below), then you will need about 3G of space. If not, you will only need about 550M. Be careful to maintain the internal directory structure of this archive when you unzip!!

2. Copy the included file "statecode.ado" to the appropriate directory for Stata ado files (e.g. ~/ado for Linux, c:\ado for Windows). 

3a. On a UNIX-type machine (e.g. Ubuntu or Mac), you can now execute the included Bash script "public_replication_compile.sh". This will start from the raw IPEDS and Title IV files as originally downloaded from the web, assemble all datasets used in the paper, and then save all tables and figures from the paper into new directories called "Tables" and "Figures." If you want to save time and disk space, you can skip the initial steps of assembling the datasets from the raw files, and merging the datasets together, by commenting out the appropriate lines of code in public_replication_compile.sh. The output of these steps is already bundled in the archive, so executing these sections of the script just overwrites the existing files.

3b. On a Windows machine, you will need to take the following steps:
- First, in any of the code below that you wish to run, you will need to replace the forward slash "/" in any directory paths to a back slash "\".
- If you want to rebuild the IPEDS data from raw files: Change to the subdirectory Data\IPEDS\Files that should have been created when you extracted the archive. Extract the archive files.zip to this folder. Then change the Code subdirectory, and run the Stata code IPEDS.do. This will overwrite the existing file IPEDS.dta in the Data subdirectory.
- If you want to rebuild the Title IV data from raw files: Change to the subdirectory Data\TitleIV\Files that should have been created when you extracted the archive. Extract the archive files.zip to this folder. Then change the Code subdirectory, and run the Stata code TitleIV.do. This will overwrite the existing file TitleIV.dta in the Data subdirectory.
- If you want to rebuild the merged dataset that we use in much of our analysis: Change to the top directory, and run the State code RFS_OUP_1_merge.do. This will overwrite the existing file IPEDS_TitleIV_merged.dta in the Data directory.
- Then, to generate all tables and figures from the paper: In the top directory, create a folder called Tables and another called Figures. Then run the Stata code "RFS_OUP_1_merge.do". This will create all figures and tables from the paper, other than Figure 9.
- To create FIgure 9, run the Julia code "RFS_OUP_1_Fig9.jl". You may need to install some supporting packages for this code to run.
